package com.smart.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author zhanghong
 */
@Data
@NoArgsConstructor
@ApiModel("新增角色入参")
public class RoleAddRequest implements Serializable {
    @Length(min = 1, max = 20, message = "角色名称不能超过20个字")
    @NotEmpty(message = "角色名称不能为空")
    @ApiModelProperty("角色名称")
    private String roleName;
    @Length(max = 50, message = "备注不超过50个字")
    @ApiModelProperty("角色描述")
    private String description;
    @NotNull(message = "权限不能为空")
    @ApiModelProperty("权限id集合")
    private List<Long> permissionIds;
}
